/* GUI CONVERTED from sopirp01.p (converter v1.75) Sat Aug 12 17:26:42 2000 */
/* sopirp01.p - SALES ORDER PRICING REPORT SELECTION CRITERIA           */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert sopirp01.p (converter v1.00) Fri Oct 10 13:57:21 1997 */
/* web tag in sopirp01.p (converter v1.00) Mon Oct 06 14:17:48 1997 */
/*F0PN*/ /*K0W7*/ /*                                                    */
/*V8:ConvertMode=FullGUIReport                                 */
/* REVISION: 7.5      LAST MODIFIED: 02/01/95   BY: tjm *J042*          */
/* REVISION: 8.5      LAST MODIFIED: 01/23/96   BY: jpm *J0C6*          */
/* REVISION: 8.6      LAST MODIFIED: 10/13/97   BY: gyk *K0W7*          */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KN* myb              */


/*GUI global preprocessor directive settings */
&GLOBAL-DEFINE PP_PGM_RP TRUE
&GLOBAL-DEFINE PP_ENV_GUI TRUE


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

     {mfdtitle.i "b+ "}

     define new shared variable sonbr        like so_nbr.
     define new shared variable sonbr1       like so_nbr.
     define new shared variable socust       like so_cust.
     define new shared variable socust1      like so_cust.
     define new shared variable sobill       like so_bill.
     define new shared variable sobill1      like so_bill.
     define new shared variable soship       like so_ship.
     define new shared variable soship1      like so_ship.
     define new shared variable soorddate    like so_ord_date.
     define new shared variable soorddate1   like so_ord_date.
     define new shared variable soduedate    like sod_due_date.
     define new shared variable soduedate1   like sod_due_date.
     define new shared variable soprdate     like so_priced_dt.
     define new shared variable soprdate1    like so_priced_dt.

     
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
        
 RECT-FRAME       AT ROW 1.4 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1   COLUMN 3 NO-LABEL
 SKIP(.1)  /*GUI*/
sonbr          colon 25
        sonbr1         colon 48 label {t001.i}
        socust         colon 25
        socust1        colon 48 label {t001.i}
        sobill         colon 25
        sobill1        colon 48 label {t001.i}
        soship         colon 25
        soship1        colon 48 label {t001.i}
        soprdate       colon 25
        soprdate1      colon 48 label {t001.i}
        soorddate      colon 25
        soorddate1     colon 48 label {t001.i}
        soduedate      colon 25
        soduedate1     colon 48 label {t001.i}
      SKIP(.4)  /*GUI*/
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER.
 F-a-title = &IF (DEFINED(SELECTION_CRITERIA) = 0)
  &THEN " Selection Criteria "
  &ELSE {&SELECTION_CRITERIA}
  &ENDIF .
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:WIDTH-PIXELS in frame a =
  FONT-TABLE:GET-TEXT-WIDTH-PIXELS(
  RECT-FRAME-LABEL:SCREEN-VALUE in frame a + " ", RECT-FRAME-LABEL:FONT).
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5. /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



     /* SET EXTERNAL LABELS */
     setFrameLabels(frame a:handle).
/*K0W7*/ {wbrp01.i}
/*J0C6*/ /*V8+*/


/*GUI*/ {mfguirpa.i true  "printer" 132 }

/*GUI repeat : */
/*GUI*/ procedure p-enable-ui:

        if sonbr1 = hi_char then sonbr1 = "".
        if socust1 = hi_char then socust1 = "".
        if sobill1 = hi_char then sobill1 = "".
        if soship1 = hi_char then soship1 = "".
        if soprdate = low_date then soprdate = ?.
        if soprdate1 = hi_date then soprdate1 = ?.
        if soorddate = low_date then soorddate = ?.
        if soorddate1 = hi_date then soorddate1 = ?.
        if soduedate = low_date then soduedate = ?.
        if soduedate1 = hi_date then soduedate1 = ?.

        view frame a.

/*K0W7*/ if c-application-mode <> 'web' then
        
run p-action-fields (input "display").
run p-action-fields (input "enable").
end procedure. /* p-enable-ui, replacement of Data-Entry GUI*/

/*GUI*/ procedure p-report-quote:


/*K0W7*/ {wbrp06.i &command = update &fields = "  sonbr sonbr1 socust socust1
sobill sobill1 soship soship1 soprdate soprdate1 soorddate soorddate1 soduedate
soduedate1" &frm = "a"}

/*K0W7*/ if (c-application-mode <> 'web') or
/*K0W7*/ (c-application-mode = 'web' and
/*K0W7*/ (c-web-request begins 'data')) then do:

        bcdparm = "".
        {mfquoter.i sonbr}
        {mfquoter.i sonbr1}
        {mfquoter.i socust}
        {mfquoter.i socust1}
        {mfquoter.i sobill}
        {mfquoter.i sobill1}
        {mfquoter.i soship}
        {mfquoter.i soship1}
        {mfquoter.i soorddate}
        {mfquoter.i soorddate1}
        {mfquoter.i soprdate}
        {mfquoter.i soprdate1}
        {mfquoter.i soduedate}
        {mfquoter.i soduedate1}

        if sonbr1 = "" then sonbr1 = hi_char.
        if socust1 = "" then socust1 = hi_char.
        if sobill1 = "" then sobill1 = hi_char.
        if soship1 = "" then soship1 = hi_char.
        if soorddate1 = ? then soorddate1 = hi_date.
        if soorddate = ? then soorddate = low_date.
        if soprdate1 = ? then soprdate1 = hi_date.
        if soprdate = ? then soprdate = low_date.
        if soduedate1 = ? then soduedate1 = hi_date.
        if soduedate = ? then soduedate = low_date.

/*K0W7*/ end.
               /* SELECT PRINTER */
               
/*GUI*/ end procedure. /* p-report-quote */
/*GUI - Field Trigger Section */

/*GUI MFSELxxx removed*/
/*GUI*/ procedure p-report:
/*GUI*/   {gpprtrpa.i  "printer" 132}
/*GUI*/   mainloop: do on error undo, return error on endkey undo, return error:


        /*fdn*/ {hksimsg.i """" """"}

        /* MAIN REPORT LOGIC */
        /*fdn* {gprun.i ""sopirp1a.p""} */
        /*fdn*/ {gprun.i ""hksopirp2a.p""}

        /* REPORT TRAILER */
        
/*GUI*/ {mfguitrl.i} /*Replace mfrtrail*/

/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/


     end.  /* repeat */

/*K0W7*/ {wbrp04.i &frame-spec = a}

/*GUI*/ end procedure. /*p-report*/
/*GUI*/ {mfguirpb.i &flds=" sonbr sonbr1 socust socust1 sobill sobill1 soship soship1 soprdate soprdate1 soorddate soorddate1 soduedate soduedate1 "} /*Drive the Report*/
